package org.example.climactic.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/hello")
@Tag(name = "Hello 接口", description = "提供简单的问候语服务！")
public class HelloController {

    @GetMapping()
    @Operation(summary = "获取问候语", description = "返回标准的问候信息！")
    public String sayHello() {
        return "Hello, Spring Boot!";
    }
   @PostMapping()
    @Operation(summary = "获取问候语", description = "返回标准的问候信息！")
    public String postHello(@RequestParam String name){
        return "Hello, " + name+"!";
   }
}